<?php 
	$_SESSION['realpage'] = true;
?>



<?php
// includes
require_once "./class.GeneralServices.php";
$error = false;
session_start();
if (isset($_SESSION['error']) )
{
	$error = $_SESSION['error']; //TODO: display error.
	unset( $_SESSION['error']);
	$_SESSION['error'] = false;
}

// prevent form-spoofing
$spoof_preventer = $_SESSION['spoof_preventer'];

//register
GeneralServices::getService()->register($_REQUEST['Username'], $_REQUEST['Rpassword'], $_REQUEST['Firstname'], $_REQUEST['Lastname'], $_REQUEST['Birthday'], $_REQUEST['about'], $_REQUEST['Email']);
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<?php require_once "./HtmlIncludes.php";?>
<title>Urban Dynamics </title>

</head>

<?php 
//TODO: write a page
?>

<body>
	<div align="right">
	<div style="float:left;"><img alt="Urban Dynamics" src="./../Images/UrbanLogo.PNG"/></div> 
	</div>
	<div style="padding-top:144px;">
		<div style="border: 2px solid grey; font-size: 2.5em; width: 550px; margin-left: 70px; text-align: center;">Welcome To Urban Dynamics</div>
		<div style="border: 2px solid red; width: 400px; height: 200px; margin-left: 150px; margin-top: 20px;">
			<?php if(isset($_SESSION['userObj']))
				{
					echo '<a href="./panes.php">Thank you very much for registering, click this div to continue!</a>';
				}
				else 
				{
					echo '<a href="./WelcomePage.php">We are sorry but there was a problem in you registration, \'<br>\'Please try again...</a>';
				}
			?>
		</div>
		<div style="color: grey; margin-left: 105px; margin-top: 20px;">Urban Dynamics is not a trademark nor does it have any copyrights</div>
	</div>
</body>
<script type="text/javascript">
	
</script>
</html>
<?php 
	$_SESSION['realpage'] = false;
?>